<?php
namespace app\common\model;

use think\Model;
use think\Db;
use think\Exception;

class ShopClassModel extends Model
{
    //一级分类获取
    public function get_shop_class(){
        $result = $this
            ->table('ds_shop_class_fir')
            ->order('shop_class_fir_id desc')
            ->field('*')
            ->select()
            ->toArray();
        return $result;
    }
    //二级分类 多层
    public function get_shop_detail_class($where){
        $result = $this
            ->table('ds_shop_class')
            ->order('shop_class_id desc')
            ->where($where)
            ->field('*')
            ->select()
            ->toArray();;
        return $result;
    }
}